<?php
namespace app\manager\model;

use think\Model;

class CarCates extends \think\Model
{
    //多语言实现
    protected $table = 'car_cates';

    public function caravans(){
        return $this->hasMany('Caravans','car_cates_id');
    }
    


    public function getCarCateList()
    {
        return $this->select();
    }

    public function createCarCate($post_carcate_info)
    {
        return $this->create($post_carcate_info);
    }

    /**
     * 获取房车信息
     * @param  [type] $getTypeArray [description]
     * @return [type]               [description]
     */
    public function getCarCateInfo($getTypeArray)
    {
        return self::get($getTypeArray);
    }

    public function updateCarCate($id, $post_carcate_info)
    {
        return $this->where('id',$id)->update($post_carcate_info);
    }

    public function delInfo($id)
    {
        $result = $this->destroy($id);
        if ($result) {
            return true;
        }
        return false;
    }

    
}